package main;

import java.util.List;

import dao.BaseSql;
import dao.UserDao;
import entiy.User;


public class Demo {
	BaseSql bs=new BaseSql();
	public Demo(){
		UserDao ud=new UserDao();
//		User user=ud.findById(2);
	    //System.out.println(user.getId()+" "+user.getName());
		User u=new User();
		u.setPassword("123"); u.setRole("admin");
		List<User> xlist=ud.findBy(u);
		System.out.println("大小："+xlist.size());
		for (User user2 : xlist) {
			System.out.println(user2.getId()+" "+user2.getName());
		}
	}
	public static void main(String[] args) {
			new Demo();	
	}
	
}
